<!doctype html>
<html class="no-js fixed-layout" data-ng-app="audittest">
#include("/WEB-INF/tpl/head.vm")
<link rel="stylesheet" href="../assets/css/amazeui.tree.css" />
<div data-ng-controller="admin-person">
	<div class="am-cf am-padding">
		<div class="am-fl am-cf">
			<strong class="am-text-primary am-text-lg">首页</strong> /
			<small>人员设置</small>
		</div>
	</div>
	<div>
		<div class="am-in">
			<button type="button" class="am-margin-right am-btn am-btn-default" data-ng-click="add()">新增人员</button>
			<button type="button" class="m-margin-right am-btn am-btn-secondary" id="doc-prompt-toggle">
				<i class="am-icon-cloud-upload"></i> 批量新增
			</button>
			<div class="am-u-sm-3 am-margin-right am-form">
				<input type="text" data-ng-model="userfilter" placeholder="输入名称查找" />
			</div>
		</div>
		<ul class="am-tree am-u-sm-3" id="firstTree">
			<li class="am-tree-branch am-hide" data-template="treebranch">
				<div class="am-tree-branch-header">
					<button class="am-tree-branch-name">
						<span class="am-tree-icon am-tree-icon-folder"></span>
						<span class="am-tree-label"></span>
					</button>
				</div>
				<ul class="am-tree-branch-children"></ul>
				<div class="am-tree-loader">
					<span class="am-icon-spin am-icon-spinner"></span>
				</div>
			</li>
			<li class="am-tree-item am-hide" data-template="treeitem">
				<button class="am-tree-item-name">
					<span class="am-tree-icon am-tree-icon-item"></span>
					<span class="am-tree-label"></span>
				</button>
			</li>
		</ul>
	</div>

	<div class="am-u-sm-9">
		<div class="am-scrollable-horizontal">
			<table class="am-table am-table-bd am-text-nowrap am-table-striped admin-content-table">
				<thead>
					<tr>
						<th>序号</th>
						<th>登录名</th>
						<th>姓名</th>
						<th>性别</th>
						<th>机构</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<tr data-ng-repeat="item in persons | filter:userfilter track by $index">
						<td>{{$index + 1}}</td>
						<td>{{item.username}}</td>
						<td>{{item.realname}}</td>
						<td>{{item.usersex | sexfilter}}</td>
						<td>{{orgPathMaps[item.userdep]}}</td>
						<td>
							<button type="button" id="btn{{$index}}" class="{{item.enabled | showStatus}}" data-ng-click="editStatus($event,item)">{{item.enabled | checkStatus}}
							</button>
						</td>
						<td>
							<div data-ng-show="item.enabled">
								<button type="button" class="am-btn am-btn-primary" data-ng-click="edit(item)">编辑</button>
								<button type="button" class="am-btn am-btn-danger" data-ng-click="deleteItem(item)">删除</button>
								<button type="button" class="am-btn am-btn-danger" data-ng-click="resetPass(item)">重置密码</button>
							</div>
							<div data-ng-hide="item.enabled">该用户已失效</div>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>


	<div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1">
		<div class="am-modal-dialog">
			<div class="am-modal-hd">
				新增/编辑 人员
				<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
			</div>
			<div class="am-modal-bd am-form am-form-horizontal">
				<table class="am-table am-table-bd am-table-striped admin-content-table">
					<tr>
						<td>人员编号</td>
						<td>
							<input data-ng-model="currentItem.userbh" type="text" readonly="readonly" />
						</td>
					</tr>
					<tr>
						<td>登录名</td>
						<td>
							<input type="text" data-ng-model="currentItem.username" />
						</td>
					</tr>
					<tr>
						<td>真实名</td>
						<td>
							<input data-ng-model="currentItem.realname" type="text" />
						</td>
					</tr>
					<tr>
						<td>年龄</td>
						<td>
							<input data-ng-model="currentItem.userage" type="number" />
						</td>
					</tr>
					<tr>
						<td>性别</td>
						<td>
							<select data-ng-options="wk.value as wk.label for wk in sexs" data-ng-model="currentItem.usersex"></select>
						</td>
					</tr>
					<tr>
						<td>序列</td>
						<td>
							<select data-ng-options="wk.seqbh as wk.seqname for wk in seqs" data-ng-model="currentItem.workseq"></select>
						</td>
					</tr>
					<tr>
						<td>分类</td>
						<td>
							<select data-ng-options="wk.catebh as wk.catename for wk in cates" data-ng-model="currentItem.worktype"></select>
						</td>
					</tr>
					<tr>
						<td>当前职级</td>
						<td>
							<select data-ng-options="wk.levelbh as wk.levelname for wk in levels" data-ng-model="currentItem.curlevel"></select>
						</td>
					</tr>
					<tr>
						<td>当前机构</td>
						<td>
							<select data-ng-options="wk.ext as wk.path for wk in orgs" data-ng-model="currentItem.userdep"></select>
						</td>
					</tr>
				</table>
				<button type="button" class="am-btn am-btn-primary" data-ng-click="postData()">提交</button>
			</div>
		</div>
	</div>


	<div class="am-modal am-modal-prompt" tabindex="-1" id="my-prompt">
		<div class="am-modal-dialog">
			<div class="am-modal-hd">CSV文件上传</div>
			<div class="am-modal-bd">
				<div class="am-form-group">
					<!-- <label for="doc-ipt-file-1">CSV文件上传</label> -->
					<div align="center" style="margin-left: 120px">
						<form method="post" enctype="multipart/form-data" id="submitForm">
							<input type="file" name="file" id="uploadFile">
						</form>
					</div>
					<p class="am-form-help">请选择要上传的文件...</p>
				</div>
			</div>
			<div class="am-modal-footer">
				<span class="am-modal-btn" data-am-modal-cancel>取消</span>
				<span class="am-modal-btn" data-am-modal-confirm>提交</span>
			</div>
		</div>
	</div>

</div>
#include("/WEB-INF/tpl/footer.vm")
<script src="../assets/js/amazeui.tree.js"></script>

</html>